import math


def distance(point1, point2):
    return math.sqrt((point2[0] - point1[0]) ** 2 + (point2[1] - point1[1]) ** 2)


def heron(a, b, c):
    s = (a + b + c) / 2
    return math.sqrt(s * (s - a) * (s - b) * (s - c))


def quadrilateral_area(points):

    a = distance(points[0],points[1])
    b = distance(points[1], points[2])
    c = distance(points[2], points[3])
    d = distance(points[3], points[0])
    e = distance(points[0], points[2])

    return heron(a,b,e)+heron(c,d,e)



points = [(0, 0), (1, 0), (1, 1), (0, 1)]
print(quadrilateral_area(points))
